

#查找当前目录下的所有源文件，并将名称保存到SRCS目录
aux_source_directory(. SRCS)

#指定头文件目录,PROJECT_SOURCE_DIR为工程的根目录  
include_directories(${PROJECT_SOURCE_DIR}/include)

#指定可执行文件的输出目录，输出到bin下面  
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)


#指定库文件输出路径  
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#指定生成目标
add_executable(main ${SRCS})

#链接共享库
target_link_libraries(main ${PROJECT_SOURCE_DIR}/lib/jsoncpp/libjsoncpp.a)
target_link_libraries(main ${PROJECT_SOURCE_DIR}/lib/curl/libcurl.a)
target_link_libraries(main ${PROJECT_SOURCE_DIR}/lib/openssl/libssl.a)
target_link_libraries(main ${PROJECT_SOURCE_DIR}/lib/openssl/libcrypto.a)
target_link_libraries(main -lpthread)
target_link_libraries(main -ldl)


